#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time:2020/10/30 9:16 下午
# @Author:boyizhang

from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from sqlalchemy.ext.declarative import declarative_base

# 初始化连接
engine = create_engine('sqlite:///./bookkeeping.db',connect_args={"check_same_thread": False},echo=True)

# 声明映射
Base = declarative_base()
# 创建会话
Session = sessionmaker(bind=engine,autocommit=False,autoflush=False)